Added method to update particle positions