Added contains_variable function