filter by groups

@mattdrayer this is new PR in place of #139