implement stack with array.