changed log to console.log in example