first draft of type system