http://pastebin.com/iRfDJL2k