linkedlist: finsished implementation of partition