simplification for equals() method and code styling