added some unit tests. i guess.