updated cubes script