ad Giulio update of the stanford script