adding function onDeviceReady on index.html