try to rescue typemap

better test harness, some asserts