Refactored for radio buttons.