add ben's particle filter functions