Wip/py3 support

add support for py3 (and keep py2 compatibility)