code now generates a cube model