adding refactors that didn't make it through last time