Created method to remove node in linked list