public void step(boolean blockStep) {
		Configuration[] configs = configurations.getValidConfigurations();
		ArrayList list = new ArrayList();
		HashSet reject = new HashSet();

		// Clear out old states.
		configurations.clearThawed();

        if (!blockStep){ //for ordinary automaton
            for (int i = 0; i < configs.length; i++) {
                //System.out.println("HERE!");
                ArrayList next = simulator.stepConfiguration(configs[i]);
                //MERLIN MERLIN MERLIN MERLIN MERLIN//
                if (next.size() == 0) { //crucial check for rejection
                    //System.out.println("Rejected");
                    reject.add(configs[i]);
                    list.add(configs[i]);
                } else
                    list.addAll(next);

            }
        }
      

		// Replace them with the successors.
		Iterator it = list.iterator();
		while (it.hasNext()) {
			Configuration config = (Configuration) it.next();
			configurations.add(config);
			if (reject.contains(config))
				configurations.setReject(config);

		}
		// What the devil do I have to do to get it to repaint?
		configurations.validate();
		configurations.repaint();

		// Change them darned selections.
		changeSelection();
		// Ready for the ugliest code in the whole world, ever?
		try {
			// I take this action without the knowledge or sanction of
			// my government...
			JSplitPane split = (JSplitPane) configurations.getParent()
					.getParent().getParent().getParent();
			int loc = split.getDividerLocation();
			split.setDividerLocation(loc - 1);
			split.setDividerLocation(loc);
			// Yes! GridLayout doesn't display properly in a scroll
			// pane, but if the user "wiggled" the size a little it
			// displays correctly -- now the size is wiggled in code!
		} catch (Throwable e) {

		}
		
//		State current = null;
//		Iterator iter = list.iterator();
//		int count = 0;

        //MERLIN MERLIN MERLIN MERLIN MERLIN// //forgetting BlockStep for now
////      if (blockStep) { //should ONLY apply to Turing Machines //      while (iter.hasNext()) {
////          Configuration configure = (Configuration) iter.next();
////              current = configure.getCurrentState();
////          if (configure.getBlockStack().size() > 0) {
////                  if(((Automaton)configure.getAutoStack().peek()).getInitialState() != current || configure.getBlockStack().size()>1){
////                      if(!configure.isAccept()){
////                          count++;
////                          if(count > 10000){
////                              int result = JOptionPane.showConfirmDialog(null, "JFLAP has generated 10000 configurations. Continue?");
////                              switch (result) {
////                              case JOptionPane.CANCEL_OPTION:
////                              case JOptionPane.NO_OPTION:
////                                  return;
////                              default:
////                              }
////                          }
//              step(blockStep);
////                      }
////                      break;
////                  }
////          }
////      }
//  }
	}