Verified sorting works