test with reduce by key first