second else statement and console.log added