made radio button selecting code a bit nicer