working on type system