code to understand groupBy. Now its clear.