finished replacement of char