almost fixed the MA calculator and the unit test