moved some algorithms of list from NList to main class