fixed up algos to work with mi datasets. references #29