optimized performance. using stdout direct output instead of a temp exchange file