made progress though I don't know if it runs any faster now. basically it doesn't isntantiate circles every cycle but instead just updates their information every cycle. There is a problem with finding the endpoints atm.