change to js file to ondeviceready