reader.getInput(), fixed i incrementation