added option for stdin processing