I see this and the previous variable declarations are made for either both of the cases, can we move this outside this if/else statement so that it's only made once.