updated to use json response