Formatted updateProfile function