Modified CharProvider example