scanner get next char function fine