implemented PUT request, update method