sorter  constructer method return it's correct type