corrected algebraic error in mathematical formalism and typos