Implement .filter and .groupBy