refactored any? method