added modify due date algorithm