updated like circle linked list program