Staying simple. Made a node function that shifts an element from the array and is referenced by the variable node.