Sorting works in ids.py