A* written, untested