code refactor for glob support of the libs