remove duplicate substring call