lda function added