Possible reuse of a variable, maybe this block is not so intuitive to read.