sorting testing method