replaced system.console.readLine() with a bufferd reader