addEventListener deviceready dont forget to change the media path