adding the forecast function.