getReplace() function added