updated stata script