updated user update function