removing code from client, placing into API on SortedSet