Fixing cube function to actually cube instead of square