have number of pagination buttons generating dynamically as well as the carousal ul