With a given list of options, sorts the list