User flock determination, refactoring