wrote stack backed by linked list