done function checkingFor2opt