changed sum function nested for loop task_04