update script editor function