addition of console.log printout to else if statement part