adding gensim code. need to test this elsewhere