Created a stack using linkedlist