http://pastebin.com/1J4EG2tD