added sum printing