Changed device_num to 0 in example