first working version of particle class