modify sorting to account for double didget versions