work with pipes and input redirect