add basic test, fix run-time require of subtypes