added comments to function 12 sortingTime.