updated recalculating_adherence script