created if and console.log