added SharedPreferences logic and created GameData class