removed data[0] being overwritten in read_reg