added more functionality to linked list class