simplify instance's stdin handling