Update cubes.cpp