adding linked list class for intersections