added glob function