calculations to solve for relevant cash flows