moved logic from main() into CustomScoringHelper class