added lda module, writes output to text file