DONE! the issue was that my sort was using a set. any of the dimensions with a repeated number would not be sorted properly