moved particle methods to lib.pde