added complete stack functionality