use double[][] instead of List<double[]>