Switched to buffered reader for input