changed SortingWIndow object into non main method object.