1st version of insertion heuristic