new deviceReady  function