sorting and testing sorting