finish cornerProblem, except for heur function