Added tests to check it calculates correctly
Merged