function for making radio buttons from list