added first round of unit tests, passing so far