extracted topics code from textir