Simplified algorithm setting correct radios checked