allow params to be used with HAVING
merge addHavingParams branch