added option to set number of cores used by particlesystem