nit don't declare a variable inside an if statement.