migration to python 3.4 (not fully tested)