python refactoring

just because I want to make everything python