working on categories spec, added sorting method to util