Changed console.log to return boolean