Changed how external reference is obtained