added update function to add users