added json response and testcase