protected static void startServerListener (int portNumber) {
		String requestServerInitials = null;

		try {

			aSocket = new DatagramSocket(Parameters.UDP_PORT_REPLICA_MANAGER);
			byte [] buffer = new byte [Parameters.UDP_BUFFER_SIZE];

			//always listen for new messages on the specified port
			while (waitForConnection) {							

				DatagramPacket request = new DatagramPacket(buffer, buffer.length);
				aSocket.receive(request);

				//get the data from the request and check
				dataRecieved = new String(request.getData());
				//dataRecieved.toUpperCase();
				messageArray = dataRecieved.split(Parameters.UDP_PARSER);

				//parserPosition = dataRecieved.indexOf(Parameters.UDP_PARSER);
				System.out.println(dataRecieved);

				if(messageArray[0].equals(Parameters.LR_NAME))
				{
					//check the message from the Replica A
					if (messageArray[1].contains(Parameters.RA_NAME)) 
					{
						replicaAcounter ++;
						if(replicaAcounter >= 3) 
						{
							replicaAcounter = 0;
							stopServer(Parameters.UDP_PORT_REPLICA_A);
						}
					} //check the message from the Replica B
					else if (messageArray[1].contains(Parameters.RB_NAME)) 
					{
						replicaBCounter ++;
						if(replicaBCounter >= 3) 
						{
							replicaBCounter = 0;
							stopServer(Parameters.UDP_PORT_REPLICA_B);
						}
					}
				}
			}
		}
			catch (Exception e) {e.printStackTrace();} 
		}