necessary changes are made for update functionality and first part is done