forecasting code - not merged with events yet