improving type system