added implementation and testing for LinkedStack