Added calculation for test 6