moved hashCode & equals into the Entity base class