added query by name and json response for web