refactoring the existing setup into smaller modules