modified lnkedListStack.js