implementing a globbing pattern