added alternate methods for sorting and testing