modified the code to receive json from the request, and added a test page