Added newer version of cube_functional