add linked list implementation using class