Why when I use if/else statements I get unexpected behavior of the filters button I mean the state value of the class attribute is assigned to several buttons but not only o