separe equals and deep equals method