added particle resampling technique