added more conditions for the due date, days left.