add tests (TDD in C, FTW)