sorted_fields now accepts string as parameter