tweaked globbing code