refactored POST
refactored PUT
refactored DELETE