converted typeglob to sub