fix param position
add support for py3 dict.items()