little chained-id optimization