extremely rudimentary A* working