making sure double array is sent to Java