Hacked together a json response system