adds quotation index sort function