adds update profile function