add single link list
refactor code for link list