added logic to add and remove characters from a cursestring struct