added radio buttons to switch the sorting algorithm