added equals, hashcode and tostring methods
extended type support