Major update. D can be any number.

Before, only D= 2 was supported, but now any D is supported.