moving dynamic allocation from main logic to SkipNode constructor