update sample years script to fix memory issue