added a sorting class