@xiangli-cmu The `range` operator lets you retrieve the index:

```go
for i, peer := range s.peers {
    peers[i] = peer
}
```