added stack with array