refactored forecast