added LDA loop and updating of matric
added LDA loop and updating of matric