implimented the stack using linkedlist