Implementing A* - not finished