added forecast function