added sorted() and reverse()