refactor userprofile