On request from Abhishek, quickly added support till d = 10. A quick fix.