updated to support pipe (only one)