modifications to handle put and delete requests