CS373: new a star algorithm