sort out categories