Adding sorting feature.