added collection sorting
removed util from global scope