simplify IO reading