public void startAdmin() {
		
		CommIn c = new CommIn();
		Thread server = new Thread(c);
		server.start();
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    String cmd = null;
	   
	    while(true) {
	    	CommOut send = new CommOut();
	    	try {
		    	
		    	cmd = br.readLine();
		    	
//		    	System.out.println(cmd);
		    	if (cmd.contains("help")){
		    		System.out.println("The following commands are available: average, minimum, maximum, period, threshold and help");
		    	}else if(cmd.contains("average")){
		    		send.send("QUERY AVG\n");
		    	}else if(cmd.contains("test")){
		    		send.send("CMD SET 10\n");
		    	}else if(cmd.contains("minimum")){
		    		send.send("QUERY MIN\n");
		    	}else if(cmd.contains("maximum")){
		    		send.send("QUERY MAX");
		    	}else if(cmd.contains("period")){
		    		System.out.println("please input new value for period:");
		    		String value = br.readLine();
		    		send.send("CMD PRD "+value+"\n");
		    	}else if(cmd.contains("threshold")){
		    		System.out.println("please input new value for threshold:");
		    		String value = br.readLine();
		    		send.send("CMD THR "+value+"\n");
		    	}else{
		    		System.out.println("not a valid command, use help");
		    	}
		    	
		    } 
		    catch (IOException e) {
		       System.err.println("Error!");
		    }
		    
	    }
	}