updated fig script