Created (broken) GetDeviceId function