Made Stack Work with Arrays