modifications to particles to fix little endian bug