added Python3 support