changed variable to deviceready()