builds linked list rather than just spitting out the code
added test cases
whoops forgot to add this, generates a linked list rather than just spitting out code