private boolean valid() throws SimulationException {
		int maxCarSpaces =Integer.parseInt(gui.maxCars.getText());
		int maxSmallCarSpaces =Integer.parseInt(gui.maxSmallCars.getText());
		int maxMotorCycleSpaces =Integer.parseInt(gui.maxMotorCycles.getText());
		int maxQueueSize = Integer.parseInt(gui.maxQueue.getText());
		int seed =Integer.parseInt(gui.randomSeed.getText());
		double carProb =Double.parseDouble(gui.carProb.getText());
		double smallCarProb =Double.parseDouble(gui.smallCarProb.getText());
		double motorCycleProb =Double.parseDouble(gui.motorCycleProb.getText());
		double avgStay =Double.parseDouble(gui.avgStay.getText());
		double avgStaySD =Double.parseDouble(gui.avgStaySD.getText());
		
		if(maxCarSpaces >= 0 && maxMotorCycleSpaces >= 0 &&
				maxQueueSize >= 0 && maxSmallCarSpaces >= 0){
			if(maxSmallCarSpaces <= maxCarSpaces){
				// set up carpark and simulator with users fields 
				cp = new CarPark(maxCarSpaces, maxSmallCarSpaces, maxMotorCycleSpaces, maxQueueSize);
				s = new Simulator(seed, avgStay, avgStaySD, carProb, smallCarProb, motorCycleProb);
				gui.errorMsg.setText("");
				return true;
				
			}else{
				//display error message
				gui.errorMsg.setText("Max Small Cars must not be larger than Max Cars.");
				return false;
			}
		}else{
			//display error message
			gui.errorMsg.setText("Vaules cannot be negetive.");
			return false;
		}
	}