finish refactoring forecast queries