rewriting removestring