stack was implemented