support chaining on setAggregateFunction()
Merge pull request #212 from cyberwolf/setaggregatemethodchaning

support chaining on setAggregateFunction()