complete sort()

find a bug in del() but not yet been fixed