generic sorted functions and tests
generic modify
concrete sorted functions
concrete modify