patch from schettino72 - simplify piping