replacing clone with lodash cloneDeep