work towards python 3 compatibilty