public void request() throws IOException, InterruptedException {
		InputStreamReader reader = new InputStreamReader(System.in);
		BufferedReader input = new BufferedReader(reader);
		System.out.println("Trying to enter the critical section");
		state = WANTED;
		String groupName = null;
		do {
			System.out.println("Please specify request group");
			
			// List all groups and their members
			Iterator<Entry<String, List<String>>> iter = groupMembers.entrySet().iterator();
			while (iter.hasNext()) {
				Entry<String, List<String>> group = iter.next();
				System.out.println(group.getKey() + ": " + group.getValue().toString());
			}
			
			System.out.print(commandPrompt);
			groupName = input.readLine();
		} while (!getGroupMembers().containsKey(groupName));

		if (!getGroupMembers().get(groupName).contains(localName)) {
			System.out.println("Couldn't request. You are not a member of this group.");
			return;
		} else {
			TimeStampedMessage message = new TimeStampedMessage();
			message.setSource(localName);
			message.setKind("multicastRequest");
			message.setMulticastMessageBody(groupName, getIncMulticastSequenceNumber());
			multicast(groupName, message, true);
		}
		System.out.println("Waiting for the ACKs...............");
		while (true) {
			if (receivedAckNumber == getGroupMembers().get(groupName).size()){
				Thread.sleep(200);
				System.out.println("Received all the ACKs, holding the mutex!!!!!");
				break;
			}
		}
		receivedAckNumber = 0;
		System.out.print("Enter y to exit the release the mutex");
		System.out.print(commandPrompt);
		while (true) {
			String command = input.readLine();
			if (command.equals("y"))
				break;
		}
		System.out.println("Exit the critical section");
		state = RELEASED;
		System.out.println("Multicat the release");
		
		TimeStampedMessage releaseMessage = new TimeStampedMessage();
		releaseMessage.setSource(localName);
		releaseMessage.setKind("multicastRelease");
		releaseMessage.setMulticastMessageBody(groupName, getIncMulticastSequenceNumber());
		multicast(groupName, releaseMessage, true);
		
	}