refine ScriptRunner with delegate