updated actions to return json response