added addpeice and modified object inheritance