http://pastebin.com/vg0CHJP0