added resample_particles