Finished off random particle generation function