preliminary py3k compatibility