Adding in sort title logic