Added if and console.log