graph works with sharedpreferences