Add ref in script