private void addListeners() {
		reciever.addListener("/input", new OSCListener() {
			@Override
			public void acceptMessage(Date time, OSCMessage message) {
				System.out.println((String)message.getArguments()[0]);
			}
		});
		reciever.addListener("/gridinput", new OSCListener() {
			@Override
			public void acceptMessage(Date time, OSCMessage message) {
				String mes = ((String)message.getArguments()[0]);
				//mes.concat("\n");
				mes = mes + "Z";
				sendStatus("Solving User Puzzle... " + mes);
				Parser parser = new Parser(mes);
				if(parser.fileCanCreateGrid()){
					currentPuzzle = parser.createGrid();
					sendToGrid(currentPuzzle.gridToString());
					Solver s = new Solver();
					//Grid solved = s.bruteForce(currentPuzzle);
					long timeOne = System.currentTimeMillis();
					Grid solved = s.BFS(currentPuzzle);
					long timeTwo = System.currentTimeMillis();
					long timeInMilli = timeTwo - timeOne;
					if(solved != null){
						solved.previousGrids.add(solved);
						sendStatus("Solved User Puzzle");
						sendToGrid(solved.gridToString());
						sendToCurrentStep(solved.previousGrids.size());
						sendToMaxSteps(solved.previousGrids.size());
						sendToTimeToSolve(timeInMilli);
						currentPuzzle = solved;
					}else{
						sendStatus("This puzzle can't be solved.");
					}
				} else {
					sendStatus("Input not valid. ");
				}
			}
		});
		reciever.addListener("/presetnumber", new OSCListener() {
			@Override
			public void acceptMessage(Date time, OSCMessage message) {
				int mes = ((Integer)message.getArguments()[0]);
				//mes.concat("\n");
				//mes = mes + "Z";
				sendStatus("Solving Preset Number " + mes +"...");
				Parser parser = new Parser(GridStrings.getGrid(mes-1));
				if(parser.fileCanCreateGrid()){
					
					currentPuzzle = parser.createGrid();
					sendToGrid(currentPuzzle.gridToString());
					Solver s = new Solver();
					//Grid solved = s.bruteForce(currentPuzzle);
					long timeOne = System.currentTimeMillis();
					Grid solved = s.BFS(currentPuzzle);
					long timeTwo = System.currentTimeMillis();
					long timeInMilli = timeTwo - timeOne;
					if(solved != null){
						solved.previousGrids.add(solved);
						sendStatus("Solved Preset Number " + mes);
						sendToGrid(solved.gridToString());
						sendToCurrentStep(solved.previousGrids.size());
						sendToMaxSteps(solved.previousGrids.size());
						sendToTimeToSolve(timeInMilli);
						currentPuzzle = solved;
					}else{
						sendStatus("This puzzle can't be solved. ");
					}
					
				} else {
					sendStatus("Input not valid ");
				}
			}
		});
		reciever.addListener("/stepnumber", new OSCListener() {
			@Override
			public void acceptMessage(Date time, OSCMessage message) {
				int mes = ((Integer)message.getArguments()[0]);
				//mes.concat("\n");
				//mes = mes + "Z";
				
				if(currentPuzzle.previousGrids.size()<mes){
					sendStatus("Index Out Of Bounds!");
					return;
				}
				System.out.println("Showing Step Number " + mes);
				sendToCurrentStep(mes);
				sendToGrid(currentPuzzle.previousGrids.get(mes-1).gridToString());
			}
		});
		
	}