trim() now updates IDs