process topics
slight refactor