implementing top products functionalitiy