added update method to swarm