public boolean addModule(Module module){
		boolean attemptToSchedule=true;
		boolean coupled = false;
		int count = 0;

		if (scheduledModules.size() != 0){
			for (Module moduleTwo : scheduledModules) {
				if (checkCoupledModules(module, moduleTwo) != 0) {
					//ie cannot be scheduled today, as already scheduled one of its clashed modules
					//can be changed to allow for coupled modules to be scheduled on same day.. will need re-write of room/times class
					return false;
				}
			}
		}

		if (coupled == false) {
			// try to add module to each room.. without clashes. If cannot then
			// throw exception.
			while (attemptToSchedule==true) {
				if (rooms.get(count).addModule(module)==true){
					//successfully scheduled a module
					scheduledModules.add(module);
					module.setDayNumber(dayNumber); // set the day in the module that the module has been scheduled too.
					attemptToSchedule = false;//exit loop
					return true;
				}
					
				//if count become bigger than no of rooms
				if (count >= (rooms.size() - 1)) {
					attemptToSchedule = false;//exit loop
					return false;
				}
				count = count + 1;
			}
		}
		return false; //should never reach here.
	}