how to solve for a cube?