add test function for sorts functions