week 3 exercise
modified sum output