move getScriptId to runtime