updated stack in main