reworked Var added checkDeclaredVariables