add a new method for LDA