added movePiece function