cubetest code