fixed bug in linked list, added more tests