function calculate_dt() erased