added selectedButton property to the class