If we get rid of ids, this loop can also go away