make code more modular