Added Weighted HMM implementation