refactor update_profile_spec