portion of type system is now re-written, passes all tests