Added support for nD processing

with tests, that fail