  N-body codes to perform simulations of the origin and evolution of the Large
Scale Structure of the Universe have improved significantly over the past
decade both in terms of the resolution achieved and of reduction of the CPU
time. However, state-of-the-art N-body codes hardly allow one to deal with
particle numbers larger than a few 10^7, even on the largest parallel systems.
In order to allow simulations with larger resolution, we have first
re-considered the grouping strategy as described in Barnes (1990) (hereafter
B90) and applied it with some modifications to our WDSH-PT (Work and Data
SHaring - Parallel Tree) code. In the first part of this paper we will give a
short description of the code adopting the Barnes and Hut algorithm
\cite{barh86} (hereafter BH), and in particular of the memory and work
distribution strategy applied to describe the {\it data distribution} on a
CC-NUMA machine like the CRAY-T3E system. In the second part of the paper we
describe the modification to the Barnes grouping strategy we have devised to
improve the performance of the WDSH-PT code. We will use the property that
nearby particles have similar interaction list. This idea has been checked in
B90, where an interaction list is builded which applies everywhere within a
cell C_{group} containing a little number of particles N_{crit}. B90 reuses
this interaction list for each particle $ p \in C_{group}$ in the cell in turn.
We will assume each particle p to have the same interaction list.
  Thus it has been possible to reduce the CPU time increasing the performances.
This leads us to run simulations with a large number of particles (N ~
10^7/10^9) in non-prohibitive times.
