refactoring
refactoring
return the response as json