modified stack