dedup test working

use shorthand anonymous function for group-by test