http://pastebin.com/HdYgvvc9