Added if conditional and print out with console.log