Added minDistAssign method and tested