refactored controller methods to use built-in jsonresponse handler