Change the way we implement A*