done all TODOs!
fix flake8 warnings