What do you think of putting this  `elif average == 'samples':` after the average option checking?