refactorings
extended equals check