minor changes (change variable names and remove console.log stmt)