http://pastebin.com/qs27a0dN