Added dynamic button generation