added route function to be used to respond to json requests
ok