storing widget states in settings