refactor to use itemgetter