add type system, fix typo