fix mutability in the example