second systems programming assignment with weird C iterators and stuff. don't write c code like this, kids.