scripts adapted to run in TVERef