profile_changed changed to function