improving the resilience data maker script