deviceready check added