modified stack.js and stack view