refactor GLOBAL variable for lodash