refactoring main compare class