make python stuff more modular