implemented exit in topic selection