replacing instance_variables.include? by instance_variable_defined?