- python 2 compatibility
- removed old code