modified pasteme to execute in pipes