modify to allow json response