refactoring DoubleArrays.