add memdown support, especially for tests