added code to particles