setSortMode method added