wrote a new array-based Stack class