improved Stack.java