add doc; correct formulas