revised particle code
improved particle system code