Wrote particle class