update to allow sorting in get_items