getDeviceData moved to util