sweeping refactors