improvement of connection mode (SE or SharedPreferences)