Added the new version with sorting capabilities.