Problem 4 update: array total and average complete