Sort by functionality added