pseudo code for PUT method