public static boolean compareMatrices(Object[][] matrix1, Object[][] matrix2){
		boolean result = true;
		if(matrix1.length != matrix2.length){
			throw new IllegalArgumentException("the two matrixes don't have the same number of lines "+matrix1.length+" != "+matrix2.length);
		}
		
		for(int i=0; i<matrix1.length && result; i++){
			if(matrix1[i].length != matrix2[i].length){
				throw new IllegalArgumentException("the two matrixes don't have the same number of columns on line "+i+". "+matrix1[i].length+" <> "+matrix2[i].length);
			}else{
				for(int j=0; j<matrix1[i].length && result; j++){
					if(!matrix1[i][j].equals(matrix2[i][j])){
						result = false;
						logger.debug("row="+i+",col="+j+" the object "+matrix1[i][j]+" is not equal to "+matrix2[i][j]+" stopping iteration in matrix");
					}
				}
			}
		}
		return result;
	}