work with pipe and redirect