non-functional createPiece function