Declare the variable at the beginning of the function, and make only the attribution here.