changed the initialization of the stack to be outside of the main method