Assignment 7.2 added average=None handling