save os pref functionality