finished particle filter bare-bones implementation