improve command line (add stdin support)