added new heuristic for m=5