moved class inside LinkedList