Based on the tutorial Cubic Disarray