better use of lodash