not the distance is calculated correctly for the cubes as well.