polished the type system