updating with new scriptName functionality