also implemented it in python
enhanced a few little things