Changed device arrays to doubles