I expected that since data classes can be easily destructured when assigning to variables I could do something similar here, but in any case looking for a more elegant way than reassigning local variables on each step when having deeply nested classes.