Implemented stack functionality (push,pop,peek)