clean up of plotStates