organized python code