realization of first several methods of typechecker