add unit test and bootstrap