Added function to display links in the linked list