introduced is.sorted(), reorganized some of the 're' functions