linked list example more or less complete