http://pastebin.com/TPnY1n5f