working on stdin