functionality for both radio buttons added