cleaned up glob method