refactored modules for easier configuration