Making algorithms at least 3D, preferably nD