edited extract_particles!