use a Scanner instead of ReadString