a few more assert_type()s
add more typesafety, also use OO