change array check to '.any?'