fixed bug where linked list wasnt being added properly
output in format requested and tests pass