why cast short[] to double[] ?