Template created for linked list