extract function for unflagging users

continue moving code to the service