optimizations
typechecking