create method to dynamically change particle number