backwards compatibility for python 2/3 dictionary calls