Added functionality to store a cube