keeping obj's own methods in return result if it has the same
constructor as obj