private void writeToFile(double value) {
		/*we assume the file doesn't already exist*/
		boolean newlyCreated = true, alreadyWritten = false;
		/*we count the number of lines in the file*/
		int count = 0;
		
		try {
			File file = new File("/users/cristioara/workspace/CN_Tema06/out.txt");
			
			/*if file doesn't exists, then create it*/
			if (!file.exists()) {
				file.createNewFile();
			}
			
			BufferedReader br = null;
			 
			try {
				String sCurrentLine;
				br = new BufferedReader(new FileReader(file));
				
				int startIndex = 0;
				double currentValue;
				
				while ((sCurrentLine = br.readLine()) != null) {
					newlyCreated = false; //the file already exists
					count++;
					
					startIndex = sCurrentLine.indexOf(">");
					currentValue = Double.parseDouble(sCurrentLine.substring(startIndex + 2));
					if (Math.abs(currentValue - value) <= Math.pow(10, -1))
						alreadyWritten = true;
				}
	 
			} catch (IOException e) {
				e.printStackTrace();
			} finally {
				try {
					if (br != null)br.close();
				} catch (IOException ex) {
					ex.printStackTrace();
				}
			}
			
			count++;
			
			FileWriter fw = new FileWriter(file, true);
			BufferedWriter bw = new BufferedWriter(fw);
			
			if (newlyCreated == true)
				bw.write("Solutia 1 --> " + String.valueOf(value));
			else {
				if (alreadyWritten == false) {
				bw.newLine();
				bw.append("Solutia " + count + " --> " + String.valueOf(value));
				}
			}
			
			bw.flush();
			fw.close();
			bw.close();
 
		} catch (IOException e) {
			e.printStackTrace();
		}
	}