updated addPiece function