update logic of comparing 3 months