pipe to main thread