rewrite in python
gitignore updated