reordering, now need to use atomic increments