backwards compatibility with py 2.6