replace copyProperties by lodash