fix bug
add groupby support