added input/output from stdin/stdout