Implementation with pipes done