making this stupid thing more modular