updated logik to calculate start time