adding events to button class