change the example to use CharSequence