fixed backwards lda and implemented forwards