middleware timedelta models