reactived check_date code