addedsort and is_sorted methods