code debeugged
lda works and optimized