close #37 added better support for the type system