in next char function and mapping