plotting and hmm changes