start python rewrite