little bit of refactoring to pull out dup setups