making the button class dynamic