work on in/out/stdin/stdout