added heuristics.
Added heuristics 4 and 5.