- modularize python code