abstract away some repetitious routines
factor out the set stuff for clarity