modified testDeviceTIM