preparations for the typechecker