Add unit tests
Fix to pass unit tests