Added explanation and removed console.log