renamed cube function