adds inject method to linked list