Simpler and faster groupBy