wrote unit tests for functions in calculation.d