high level implementation of a-star findPath() method