implemented linked-list structure for leaf nodes