Declare this once on line 1111 instead of repeating it for each branch of the `if`. Remove the repeated lines below