refactored so all pool creation is handled by one module