even more py3 compat
be more correct about str/bytes