updates to make it more modular