D debug info
finally found the bug! 1-distm instead of distm
constants pre-allocation implemented -- still need diagonals