changed struct name to minDis