remove BufferedReader and add tests