updating with shared preferences for profile saving