fixed auto input, System.in is not a good way to do that