added typechecker