add testcase, cleanups