Started working on a multi-dimensional version of hadapt