added inline script string replacement