cleaned up A*