rewrite in Python