writing attributes to particles