fixed the popularity metric