add some unit tests, make them pass