change almost all uses: s/IS_DEVICE/RESOLVE_DEVICE/