implementing particle 2d