almost got end time to work