allow easier sorting by keys or accessor functions