changes to update function 0.1