schema for hmm constraint added, sorting of plots fixed