added default value for numRows
removed todos
simplified if conditions
simpler test
using parameters of binning op directly