more logic to calc next event time