updated
updated to respond in json format