updated cube generator