Adding in lda code from last time