updated annotations. fixed return code in json responses