refactor updateSavedSubs
merge and fix conflicts