added a simpler stack implementation