POC: demonstration of how to get the index of button clicked in a for loop