Implementing the particle system