mongo group function tested with key function