added sorting and reversestring
added sorting and reversestring