add lodash and allocate function