added some tests
some formulas improvements