added compat for python 3