fixed warning: Declaration shadows a local variable