optimise the number of character