making the constructor public + closing the BufferedReader properly