built popular categories functionality