add hmmstates and fix compile issue