additional refactoring to load and set to help with code complexity