some minor refactorings: equal by class, program