Added pseudocode for msgs SharedPref