refactored to glob matching