refactored tests to type level