introduced a second for loop in default sort to eliminate duplicated code
deleted commented out code
added comment