changed nstates to Number of States in plot