py2 and 3 compat, fix up param names