added cube structure and implemented Piece