second pass at py3.3 compatability