fix typo variable name and remove console.log