scanner used instead of bufferedReader