added shared preferences to the MainActivity