uncool but necessary workaround for python3