made it modular

just chanegd somethings to make it modular