MinDistance (1st task) added comments