Wrote a method getGroupDistancesWithinShell.