changed sortOption value
code refactored