move method to accessing sharedpreferences to be static