build linked list and display helper.