maintain command lists in sorted order