* @param mergeSharedVersions apply to all versions sharing the same text
	 * @return percentage of the new version that was unique, or 0 
	 * if this was the first version
	 */
	public float update( short version, char[] data,
        boolean mergeSharedVersions ) throws Exception
	{
		// to do: if version already exists, remove it first
		Converter con = new Converter();
		Graph original = con.create( pairs, versions.size() );
		if ( version < versions.size() )
        {
            //System.out.println("version="+version+" num-versions="+versions.size());
            revise( original, version, data, mergeSharedVersions );
        }
        else
            add( original, version, data );
        pairs = con.serialise();
		if ( timing )
		{
			String finishTime = new Long(System.currentTimeMillis()
				-startTime).toString();
			System.out.println( "Time taken to merge version "
				+version+"="+finishTime );
		}
		if ( numVersions()==1 )
			return 0.0f;
		else
			return getPercentUnique( version );
    }