implemented reloadScript()