refactored code for base particle builds