replace() implemented