private static boolean checkForUpdate(final View _view, final boolean _showNoUpdateMSG) {
		try {
			 // Create a URL for the desired page
	        URL url = new URL("http://juliushuelsmann.github.io/paint/currentRelease");       

	        // Read all the text returned by the server
	        BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
	        String version = in.readLine();
			in.close();
			
			final String[] result = Version.getMilestonePercentageDone(version);
			if (result == null) {
				// error
				return false;
			}

			final String MS = result[0];
			final String perc = result[1];

			try {
				
				// parse information to integer.
				int new_milestone  = Integer.parseInt(MS);
				int new_percentage = Integer.parseInt(perc);

				int crrnt_milestone  = Integer.parseInt(Version.MILESTONE);
				int crrnt_percentage = Integer.parseInt(
						Version.PERCENTAGE_DONE);
				
				if (new_milestone > crrnt_milestone
						|| (new_percentage > crrnt_percentage 
								&& new_milestone == crrnt_milestone)) {
					

					int d = JOptionPane.showConfirmDialog(_view, 
							"A new version of paint has been found:\n"
							+ "Used Version:\t"
							+ "" + crrnt_milestone + "."
							+ "" + crrnt_percentage+ "\n" 
							+ "New  Version:\t"
							+ "" + new_milestone + "."
							+ "" + new_percentage+ "\n\n" 
							+ "Do you want to download it right now? \n"
							+ "This operation will close paint and restart \n"
							+ "the new version in about one minute.",
							"Update",
							JOptionPane.YES_NO_OPTION);
					
					return d == JOptionPane.YES_OPTION;
				} else {

					if (_showNoUpdateMSG) {

						JOptionPane.showMessageDialog(_view, 
								"No updates found.",
								"Update", 
								JOptionPane.INFORMATION_MESSAGE);
						
					}
					
					return false;
				}
				
			} catch(NumberFormatException _nex) {
				
				// received version number corrupted.
				final String err_msg = "Failed to check for updates, \n"
						+ "the fetched version number is currupted.\n"
						+ "This error is server-related and will be \n"
						+ "fixed after it has been noticed by the \n"
						+ "programmer ;).";

				// report error via logger.
				model.settings.State.getLogger()
				.severe(err_msg);
				
				// notify the user if this the message call isn't silent.
				if (_showNoUpdateMSG) {

					JOptionPane.showMessageDialog(_view, 
							err_msg,
							"Update", 
							JOptionPane.INFORMATION_MESSAGE);
					
				}
				return false;
			}
			
			
       } catch (Exception e) { 

    	   // update page not found, probably due to network problems.
    	   final String err_msg = "Connection to update page failed. \n"
	    	   		+ "Either you are not corrected to the internet or \n"
	    	   		+ "the update page has been removed accidently. \n"
					+ "If you are able to connect to any other web-page,\n"
					+ "the error is server-related and will be \n"
					+ "fixed after being noticed by the \n"
					+ "programmer ;).";
    	   
    	   // report error via logger.
    	   State.getLogger().warning(err_msg);
    	   
    	   // notify the user if this the message call isn't silent.
			if (_showNoUpdateMSG) {

					JOptionPane.showMessageDialog(_view, 
							err_msg,
							"Update", 
							JOptionPane.INFORMATION_MESSAGE);
			}
			return false;
		}
	}