utilized functions to remove more duplicated code, particularly setDictVals