Separated particle alpha code to its own function