make mofile run in py2 and 3
make mofile really working in py3