I don't understand why a ref is used here.