making code more modular