add mergeDelayError and flattenDelayError