added ability to inspect first and last element.
stack implementation that uses a linked list