refactoring radio button class