Added unit tests. all are passing