Updated to include sorted collections