Added functionality to update profile