add tests for arg and stdin
use fileinput to code with stdin