new script for topic extraction