adding update function to the users controller