Fixed typo and added console.logs