return double[][] instead of int[] (makes soft assignments possible)