use linkedlist to keep track
a little trivial