working with onDeviceReady