refactored LinkedList.h