added a few assert statements
don't use a pointer for the update array
use different values to avoid division by zero when computing the particle velocity