improved InputReader