private boolean parseOptions(String[] args) {
	CommandLineParser parser = new GnuParser();
	    
	try {
	    CommandLine cl = parser.parse(opts, args);

	    // check for -help
	    if (cl.hasOption("help")) {
		showUsage();
		System.exit(0);
	    }

	    // check for -version
	    if (cl.hasOption("version")) {
		showVersion();
		System.exit(0);
	    } 

	    // check for -precision
	    if (cl.hasOption("precision")) {
		try {
		    precision = Integer.parseInt(cl.getOptionValue("precision"));
		    if (precision<0 || precision>15) throw new NumberFormatException();
		} catch(NumberFormatException nfe) {
		    System.err.println("\nprecision must be a positive integer value in the range [0,15]");
		    return false;
		}
	    } 

	    // make sure at least one file is specified
	    if (cl.getArgs().length == 0) {
		System.err.println("\nyou must specify at least one file to analyse");
		return false;
	    } 

	    // grab the filenames
	    collectionFiles = cl.getArgs();
	} catch (ParseException e) {
	    System.err.println("");
	    System.err.println( e.getMessage() );
	    return false;
	}
	    
	return true;
    }