Adding sorting capabilities