added ability to expand globbing patterns in main definition