Trying to implement particle path; having issues with memory