Modified Heuristic.py