I have a class which have some function to create buttons based on the number of items passed to that list, Each button will print the item which was passed when that button