Added multiple agents

Now supports multiple agents