Changed BufferedInput to Scanner