changed stack with linked-list