changed how stack was initialized