Add missing script function