redundant two copies of `reader.readLine()`