Can we get away with copy on write instead of mutability here?