dead code removed from pipe
add wrap helper to wrap existing middleware