added H(n) to pathCost, aka. heuristic function