added is_in_var function