create constructor and update method in button class