finish update function with HTTP PUT