remove first element, sort args and remove duplicates.