updated particle swarm class