modified script to accomodate yearly data