done codinng lc statistics. will fine tune later