kmodesD function

Adapted k-modes algorithm