moved updateDevices to APIController