Updated to add conditions for unchecked radio buttons