coding HMM file reading part now