Add sorting with primitive display.