Working on device_pointer and device_flag.