particle filter code added