implemented signatures for replace substring with substirng methods