Figured out forecast algorithm