added some documenting for print sorting