remove characters from a string using a singleton method