Added for loop for the buttons