implementing hdastar