fixes ‘Declaration shadows a local variable' warnings