add hashCode, equals and toString to Node and its derevates.