applying refactorings to the CollectionsUtil class