Really nice to see the process of thinking it through. This sort of thing gives a much better insight than just memorizing formulas.