Working through mutability issue