added six, and fixed some py3 things