added delete function to linked list