made A* faster by avoiding list scans