add lines in the end of KSorts