refactoring
add equals and hatched methods