using ordered dict for python 2.7