added shared prefs to have a saved state