renamed typechecker2 to typcheck and removed sys.outs