linked list representation of stack with iterator