Split out getCubes patch