Changed scanner to buffered reader