remove duplication in Object class