refactoring with Array#any?