Renamed time to endog for clarity