changed device.js to use the data value as the number of steps